#ifndef XL_SYSTEM_IMAGE_LIST_H
#define XL_SYSTEM_IMAGE_LIST_H
#include "../libuploader/libxluploader.h"
#include <windows.h>
#include <CommCtrl.h>
// #include <commoncontrols.h>
// #include <atlctrls.h>

typedef BOOL (WINAPI * ShellGetImageListsProc)(HIMAGELIST *phLarge, HIMAGELIST *phSmall);
typedef BOOL (WINAPI * FileIconInitProc)(BOOL fFullInit);

class CSystemImageList
{
	HINSTANCE        m_hInstShell32;
	HIMAGELIST       m_imageList;
	ShellGetImageListsProc        m_procShellGetImageLists;
	FileIconInitProc              m_procFileIconInit;

public:
	CSystemImageList(void);
	~CSystemImageList(void);

	HIMAGELIST getImageList();
	bool load();

	int getIconIndexByExt(const tstring &ext);
	int getIconIndexByName(const tstring &pathname);
};

#endif
